﻿using SqlKata;
using SqlKata.Compilers;

namespace Kele.Repository
{
    public partial class Repository : IRepository
    {

        public IRedis Redis { get; }

        public Repository(IDatabase database, IRedis redis)
        {
            Database = database;
            Redis = redis;
        }


        public  IDatabase Database  { get; }

        protected SqlResult GetSqlResult(Query query)
        {
            var compiler = new MySqlCompiler();

            SqlResult sqlResult = compiler.Compile(query);

            return sqlResult;
        }


          
    }
}